<%@ Page Language="C#" 
    MasterPageFile="~/Template.master" 
    ValidateRequest="false" 
    AutoEventWireup="true" 
    CodeFile="ShowProduct.aspx.cs" 
    Inherits="XZ.Web.UI.ShowProduct" 
    Title="XZ WebShop - Product: {0}"
    meta:resourcekey="Page" %>
<%@ Register Src="./Controls/RatingDisplay.ascx" TagName="RatingDisplay" TagPrefix="xz" %>
<%@ Register Src="./Controls/AvailabilityDisplay.ascx" TagName="AvailabilityDisplay" TagPrefix="xz" %>

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" Runat="Server">
    <table style="width: 100%;" cellpadding="0" cellspacing="0">
        <tr><td>
            <asp:Label runat="server" ID="lblTitle" CssClass="articletitle" />             
        </td>
        <td style="text-align: right;">
            <asp:Panel runat="server" ID="panEditProduct">            
            <asp:HyperLink runat="server" ID="lnkEditProduct" ImageUrl="~/Images/Edit.gif"
                ToolTip="Edit product" NavigateUrl="~/Admin/AddEditProduct.aspx?ID={0}" meta:resourcekey="lnkEditProduct" />
                &nbsp;
                <asp:ImageButton runat="server" ID="btnDelete"
                    CausesValidation="false" AlternateText="Delete product" ImageUrl="~/Images/Delete.gif" 
                    OnClientClick="if (confirm('Are you sure you want to delete this product?') == false) return false;" OnClick="btnDelete_Click" meta:resourcekey="btnDelete" />
            </asp:Panel>
        </td></tr>
    </table>
    <p></p>
    <b><asp:Literal ID="litPrice" runat="server" Text="Price: " meta:resourcekey="litPrice" /></b><asp:Literal runat="server" ID="lblDiscountedPrice"><s>{0}</s> {1}% Off = </asp:Literal>
    <asp:Literal runat="server" ID="lblPrice" />
    <p></p>   
    <b><asp:Literal ID="litAvailability" runat="server" Text="Availability: " meta:resourcekey="litAvailability" /></b><xz:AvailabilityDisplay runat="server" ID="availDisplay" /><br />   
    <b><asp:Literal ID="litRating" runat="server" Text="Rating: " meta:resourcekey="litRating" /></b><asp:Literal runat="server" ID="lblRating" Text="{0} user(s) have rated this product " meta:resourcekey="lblRated" />
    <xz:RatingDisplay runat="server" ID="ratDisplay" />      
    <p></p>
    <div style="float: left; padding: 4px; text-align: center;">
        <asp:Image runat="Server" ID="imgProduct" ImageUrl="~/Images/noimage.gif" GenerateEmptyAlternateText="true" /><br />
        <asp:HyperLink runat="server" ID="lnkFullImage" Font-Size="XX-Small" Target="_blank" Text="Full-size<br />image" meta:resourcekey="lnkFullImage" />
    </div>
    <asp:Literal runat="server" ID="lblDescription" />
    <p></p>
    <asp:Button ID="btnAddToCart" runat="server" OnClick="btnAddToCart_Click" Text="Add to Shopping Cart" meta:resourcekey="btnAddToCart" />
    <p></p>
    <div style="clear: both;"> </div>   
    <hr style="width: 100%; height: 1px;" />
    <div class="sectiontitle"><asp:Literal ID="litRate" runat="server" Text="How would you rate this product?" meta:resourcekey="litRate" /></div>
    <asp:DropDownList runat="server" ID="ddlRatings">
        <asp:ListItem Value="1" Text="1 star" meta:resourcekey="ddlRatings1Stars" />
        <asp:ListItem Value="2" Text="2 stars" meta:resourcekey="ddlRatings2Stars" />
        <asp:ListItem Value="3" Text="3 stars" meta:resourcekey="ddlRatings3Stars" />
        <asp:ListItem Value="4" Text="4 stars" meta:resourcekey="ddlRatings4Stars" />
        <asp:ListItem Value="5" Text="5 stars" Selected="true" meta:resourcekey="ddlRatings5Stars" />
    </asp:DropDownList>
    <asp:Button runat="server" ID="btnRate" Text="Rate" OnClick="btnRate_Click" CausesValidation="false" meta:resourcekey="btnRate" />
    <asp:Literal runat="server" ID="lblUserRating" Visible="False"
        Text="Your rated this product {0} star(s). Thank you for your feedback." meta:resourcekey="lblUserRating" />
</asp:Content>

